import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
import svgLoader from 'vite-svg-loader'

// https://vite.dev/config/
export default defineConfig({
  plugins: [vue(), svgLoader() ],
  resolve: {
    alias: {
      // 配置示例内部别名
      '@examples': path.resolve(__dirname, './src'),
      // 配置组件库别名
      '@pgh-big-screen/vue-ui': path.resolve(__dirname, '../packages/vue3-ui/src'),
      '@pgh-big-screen/icons': path.resolve(__dirname, '../packages/icons/src'),
    }
  },
  server: {
    port: 1688,
    open: true,
    hmr: true
  }
})
